<?php
/**
 * Zendex (Zend (Framework) Extensions)
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://zfx.netatoo.fr/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to support@netatoo.fr so we can send you a copy immediately.
 *
 * @category   Zendex
 * @package    Zendex_Bootstrap
 * @copyright  Copyright (c) 2007 Netatoo FR S.A.R.L. (http://www.netatoo.fr)
 * @license    http://Zendex.netatoo.fr/license/new-bsd     New BSD License
 */

/**
 * @see Zendex_Bootstrap
 */
require_once 'Zendex/Bootstrap.php';

/**
 * @category   Zendex
 * @package    Zendex_Bootstrap
 * @copyright  Copyright (c) 2007 Netatoo FR S.A.R.L. (http://www.netatoo.fr)
 * @license    http://Zendex.netatoo.fr/license/new-bsd     New BSD License
 */
class Zendex_Bootstrap_Dispatcher_IncludePath extends Zendex_Bootstrap_Dispatcher_Abstract
{
    /**
     * <IncludePath> for Zendex_Setup::setIncludePath()
     * 
     * @param SimpleXMLElement $config
     * @return void
     */
    public function IncludePath($config) 
    {
        $attrs  = $config->attributes();
        $paths  = $config->children();
        $separator       = !is_null($attrs['separator']) ? (string) $attrs['separator'] : ':';
        $createConstants = !is_null($attrs['createConstants']) ? (string) $attrs['createConstants'] : false;
        $withoutCurrent  = !is_null($attrs['withoutCurrent']) ? (string) $attrs['withoutCurrent'] : false;
         
        Zendex_Setup::setIncludePath($paths, $separator, $createConstants, $withoutCurrent);
        unset($attrs, $paths, $separator, $createConstants, $withoutCurrent);
    }
    
}